Component({
    properties: {
      buttons: {
        type: Array,
        value: []
      }
    },
    data: {
      isExpanded: false
    },
    methods: {
      toggleButtons() {
        this.setData({
          isExpanded: !this.data.isExpanded
        });
      },
      onButtonClick(e) {
        const value = e.currentTarget.dataset.value;
        this.triggerEvent('actionSelected', { value });
      }
    }
  });